Context adaptive entropy coding for non-square blocks in video coding

ABSTRACT

Disclosed are techniques for coding coefficients of a video block having a non-square shape defined by a width and a height, comprising coding one or more of x- and y-coordinates that indicate a position of a last non-zero coefficient within the block according to an associated scanning order, including coding each coordinate by determining one or more contexts used to code the coordinate based on one of the width and the height that corresponds to the coordinate, and coding the coordinate by performing a context adaptive entropy coding process based on the contexts. Also disclosed are techniques for coding information that identifies positions of non-zero coefficients within the block, including determining one or more contexts used to code the information based on one or more of the width and the height, and coding the information by performing a context adaptive entropy coding process based on the contexts.

This application is a continuation of U.S. application Ser. No.13/536,834, filed Jun. 28, 2012, which claims the benefit of U.S.Provisional Application No. 61/503,716, filed Jul. 1, 2011, and U.S.Provisional Application No. 61/554,301, filed Nov. 1, 2011, the entirecontents of each of which are incorporated herein by reference.

TECHNICAL FIELD

This disclosure relates to video coding, and, more particularly, tocoding blocks of residual transform coefficients generated by videocoding processes.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the High Efficiency Video Coding (HEVC) standardpresently under development, and extensions of such standards. The videodevices may transmit, receive, encode, decode, and/or store digitalvideo information more efficiently by implementing such videocompression techniques.

Video compression techniques perform spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to a referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients. Entropy coding maythen be applied to achieve even more compression.

SUMMARY

This disclosure describes techniques for coding residual transformcoefficients of non-square blocks of video data during a video codingprocess. The techniques described herein may include one or more of thefollowing techniques: (1) techniques for selecting a scanning order toscan residual transform coefficients of a non-square block of videodata; (2) techniques for determining contexts for entropy coding lastsignificant coefficient position information for a non-square block ofvideo data; (3) techniques for determining contexts for entropy codingsignificant coefficient position information for a non-square block ofvideo data; and (4) techniques for coding values, or “levels,” ofresidual transform coefficients of a non-square block of video data.

The techniques of this disclosure may improve efficiency for codingresidual transform coefficients of non-square blocks of video datarelative to other methods. In particular, the techniques may improvecompression of the residual transform coefficients of the non-squareblocks and related syntax information, when the coefficients and theinformation are coded. Additionally, the techniques of this disclosuremay enable using coding systems that have lower complexity relative toother systems to code the coefficients and the related syntaxinformation. In this manner, there may be a relative bit savings for acoded bitstream including the coded coefficients and related syntaxinformation, and a relative reduction in complexity for a system used tocode the coefficients and the related syntax information, when using thetechniques of this disclosure.

In one example, a method of coding transform coefficients associatedwith a block of video data during a video coding process, wherein theblock has a non-square shape defined by a width and a height, includescoding one or more of x- and y-coordinates that indicate a position of alast non-zero coefficient within the block according to a scanning orderassociated with the block, wherein coding each of the one or more of thex- and y-coordinates includes determining one or more contexts used tocode the respective coordinate based at least in part on one of thewidth and the height of the block that corresponds to the coordinate,and coding the respective coordinate by performing a context adaptiveentropy coding process based at least in part on the determined one ormore contexts.

In another example, a method of coding transform coefficients associatedwith a block of video data during a video coding process, wherein theblock has a non-square shape defined by a width and a height, includescoding information that identifies positions of non-zero coefficientswithin the block, wherein coding the information comprises determiningone or more contexts used to code the information based at least in parton one or more of the width and the height of the block, and coding theinformation by performing a context adaptive entropy coding processbased at least in part on the determined one or more contexts.

The techniques of this disclosure are also described in terms of anapparatus, a device comprising means for performing the techniques, anda computer-readable storage medium storing instructions that, whenexecuted, cause one or more processors to perform the techniques.

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages will be apparent from the description and drawings, and fromthe claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram that illustrates an example of a videoencoding and decoding system that may perform techniques for codingresidual transform coefficients of a non-square block of video data,consistent with the techniques of this disclosure.

FIG. 2 is a block diagram that illustrates an example of a video encoderthat may perform the techniques for encoding residual transformcoefficients of a non-square block of video data, consistent with thetechniques of this disclosure.

FIG. 3 is a block diagram that illustrates an example of a video decoderthat may perform the techniques for decoding encoded residual transformcoefficients of a non-square block of video data, consistent with thetechniques of this disclosure.

FIGS. 4A-4C are conceptual diagrams that illustrate examples of squareblocks of video data scanned using diagonal, horizontal, and verticalscanning orders.

FIGS. 5A-5C are conceptual diagrams that illustrate an example of anon-square block of video data and corresponding significant coefficientposition information and last significant coefficient positioninformation, consistent with the techniques of this disclosure.

FIGS. 6A-6F are conceptual diagrams that illustrate examples ofnon-square blocks of video data scanned using zig-zag, horizontal,vertical, and diagonal scanning orders, consistent with the techniquesof this disclosure.

FIGS. 7A-7B are conceptual diagrams that illustrate an example of anon-square block of video data that has been transposed, consistent withthe techniques of this disclosure.

FIGS. 8A-8B are conceptual diagrams that illustrate an example of asquare block of video data and a non-square block of video data, forwhich significant coefficient position information is coded using acommon one or more contexts, consistent with the techniques of thisdisclosure.

FIGS. 9A-9B are conceptual diagrams that illustrate an example of anon-square block of video data for which residual transform coefficientshave been grouped according to a diagonal scanning order, consistentwith the techniques of this disclosure.

FIGS. 10A-10B are flowcharts that illustrate examples of methods ofcoding residual transform coefficients of a non-square block of videodata, consistent with the techniques of this disclosure.

DETAILED DESCRIPTION

This disclosure describes techniques for coding residual transformcoefficients of non-square blocks of video data during a video codingprocess. The techniques described herein may include one or more of thefollowing techniques: (1) techniques for selecting a scanning order toscan residual transform coefficients of a non-square block of videodata; (2) techniques for determining contexts for entropy coding lastsignificant coefficient position information for a non-square block ofvideo data; (3) techniques for determining contexts for entropy codingsignificant coefficient position information for a non-square block ofvideo data; and (4) techniques for coding values, or “levels,” ofresidual transform coefficients of a non-square block of video data.

The techniques of this disclosure may improve efficiency for codingresidual transform coefficients of non-square blocks of video datarelative to other methods. In particular, the techniques may improvecompression of the residual transform coefficients of the non-squareblocks and related syntax information, when the coefficients and theinformation are coded. Additionally, the techniques of this disclosuremay enable using coding systems that have lower complexity relative toother systems to code the coefficients and the related syntaxinformation. In this manner, there may be a relative bit savings for acoded bitstream including the coded coefficients and related syntaxinformation, and a relative reduction in complexity for a system used tocode the coefficients and the related syntax information, when using thetechniques of this disclosure.

FIG. 1 is a block diagram that illustrates an example of a videoencoding and decoding system that may perform techniques for codingresidual transform coefficients of a non-square block of video data,consistent with the techniques of this disclosure. As shown in FIG. 1,system 10 includes a source device 12 that generates encoded video datato be decoded at a later time by a destination device 14. Source device12 and destination device 14 may comprise any of a wide range ofdevices, including desktop computers, notebook (i.e., laptop) computers,tablet computers, set-top boxes, telephone handsets such as so-called“smart” phones, so-called “smart” pads, televisions, cameras, displaydevices, digital media players, video gaming consoles, video streamingdevice, or the like. In some cases, source device 12 and destinationdevice 14 may be equipped for wireless communication.

Destination device 14 may receive the encoded video data to be decodedvia a link 16. Link 16 may comprise any type of medium or device capableof moving the encoded video data from source device 12 to destinationdevice 14. In one example, link 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wirelesscommunication protocol, and transmitted to destination device 14. Thecommunication medium may comprise any wireless or wired communicationmedium, such as a radio frequency (RF) spectrum or one or more physicaltransmission lines. The communication medium may form part of apacket-based network, such as a local area network, a wide-area network,or a global network such as the Internet. The communication medium mayinclude routers, switches, base stations, or any other equipment thatmay be useful to facilitate communication from source device 12 todestination device 14.

Alternatively, encoded data may be output from output interface 22 to astorage device 24. Similarly, encoded data may be accessed from storagedevice 24 by input interface 26. Storage device 24 may include any of avariety of distributed or locally accessed data storage media such as ahard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, storage device 24 maycorrespond to a file server or another intermediate storage device thatmay hold the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from storage device 24 viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting that encoded video datato the destination device 14. Example file servers include a web server(e.g., for a website), an FTP server, network attached storage (NAS)devices, or a local disk drive. Destination device 14 may access theencoded video data through any standard data connection, including anInternet connection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data fromstorage device 24 may be a streaming transmission, a downloadtransmission, or a combination of both.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, streaming videotransmissions, e.g., via the Internet, encoding of digital video forstorage on a data storage medium, decoding of digital video stored on adata storage medium, or other applications. In some examples, system 10may be configured to support one-way or two-way video transmission tosupport applications such as video streaming, video playback, videobroadcasting, and/or video telephony.

In the example of FIG. 1, source device 12 includes a video source 18,video encoder 20 and an output interface 22. In some cases, outputinterface 22 may include a modulator/demodulator (modem) and/or atransmitter. In source device 12, video source 18 may include a sourcesuch as a video capture device, e.g., a video camera, a video archivecontaining previously captured video, a video feed interface to receivevideo from a video content provider, and/or a computer graphics systemfor generating computer graphics data as the source video, or acombination of such sources. As one example, if video source 18 is avideo camera, source device 12 and destination device 14 may formso-called camera phones or video phones. However, the techniquesdescribed in this disclosure may be applicable to video coding ingeneral, and may be applied to wireless and/or wired applications.

The captured, pre-captured, or computer-generated video may be encodedby video encoder 20. The encoded video data may be transmitted directlyto destination device 14 via output interface 22 of source device 12.The encoded video data may also (or alternatively) be stored ontostorage device 24 for later access by destination device 14 or otherdevices, for decoding and/or playback.

Destination device 14 includes an input interface 26, a video decoder30, and a display device 28. In some cases, input interface 26 mayinclude a receiver and/or a modem. Input interface 26 of destinationdevice 14 receives the encoded video data over link 16. The encodedvideo data communicated over link 16, or provided on storage device 24,may include a variety of syntax elements generated by video encoder 20for use by a video decoder, such as video decoder 30, in decoding thevideo data. Such syntax elements may be included with the encoded videodata transmitted on a communication medium, stored on a storage medium,or stored a file server.

Display device 28 may be integrated with, or external to, destinationdevice 14. In some examples, destination device 14 may include anintegrated display device and also be configured to interface with anexternal display device. In other examples, destination device 14 may bea display device. In general, display device 28 displays the decodedvideo data to a user, and may comprise any of a variety of displaydevices such as a liquid crystal display (LCD), a plasma display, anorganic light emitting diode (OLED) display, or another type of displaydevice.

Video encoder 20 and video decoder 30 may operate according to a videocompression standard, such as the High Efficiency Video Coding (HEVC)standard presently under development by the Joint Collaboration Team onVideo Coding (JCT-VC) of ITU-T Video Coding Experts Group (VCEG) andISO/IEC Motion Picture Experts Group (MPEG), and may conform to the HEVCTest Model (HM). Alternatively, video encoder 20 and video decoder 30may operate according to other proprietary or industry standards, suchas the ITU-T H.264 standard, alternatively referred to as MPEG-4, Part10, Advanced Video Coding (AVC), or extensions of such standards. Thetechniques of this disclosure, however, are not limited to anyparticular coding standard. Other examples of video compressionstandards include MPEG-2 and ITU-T H.263. A recent draft of the HEVCstandard, referred to as “HEVC Working Draft 6” or “WD6,” is describedin document JCTVC-H1003, Bross et al., “High efficiency video coding(HEVC) text specification draft 6,” Joint Collaborative Team on VideoCoding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 8thMeeting: San Jose, Calif., USA, February, 2012, which, as of Jun. 1,2012, is downloadable fromhttp://phenix.int-evey.fr/jct/doc_end_user/documents/8_San%20Jose/wg11/JCTVC-H1003-v22.zip.

Although not shown in FIG. 1, in some aspects, video encoder 20 andvideo decoder 30 may each be integrated with an audio encoder anddecoder, and may include appropriate MUX-DEMUX units, or other hardwareand software, to handle encoding of both audio and video in a commondata stream or separate data streams. If applicable, in some examples,MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, orother protocols such as the user datagram protocol (UDP).

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice.

The HEVC standardization efforts are based on an evolving model of avideo coding device referred to as the HEVC Test Model (HM). The HMpresumes several additional capabilities of video coding devicesrelative to existing devices according to, e.g., ITU-T H.264/AVC. Forexample, whereas H.264 provides nine intra-prediction encoding modes,the HM may provide as many as thirty-three intra-prediction encodingmodes.

In general, the working model of the HM describes that a video frame orpicture may be divided into a sequence of treeblocks or largest codingunits (LCU) that include both luma and chroma samples. A treeblock has asimilar purpose as a macroblock of the H.264 standard. A slice includesa number of consecutive treeblocks in coding order. A video frame orpicture may be partitioned into one or more slices. Each treeblock maybe split into coding units (CUs) according to a quadtree. For example, atreeblock, as a root node of the quadtree, may be split into four childnodes, and each child node may in turn be a parent node and be splitinto another four child nodes. A final, unsplit child node, as a leafnode of the quadtree, comprises a coding node, i.e., a coded videoblock. Syntax data associated with a coded bitstream may define amaximum number of times a treeblock may be split, and may also define aminimum size of the coding nodes.

A CU includes a coding node and prediction units (PUs) and transformunits (TUs) associated with the coding node. A size of the CUcorresponds to a size of the coding node and must be square in shape.The size of the CU may range from 8×8 pixels up to the size of thetreeblock with a maximum of 64×64 pixels or greater. Each CU may containone or more PUs and one or more TUs. Syntax data associated with a CUmay describe, for example, partitioning of the CU into one or more PUs.Partitioning modes may differ between whether the CU is skip or directmode encoded, intra-prediction mode encoded, or inter-prediction modeencoded. PUs may be partitioned to be non-square in shape. Syntax dataassociated with a CU may also describe, for example, partitioning of theCU into one or more TUs according to a quadtree. A TU can be square ornon-square in shape.

The HEVC standard allows for transformations according to TUs, which maybe different for different CUs. The TUs are typically sized based on thesize of PUs within a given CU defined for a partitioned LCU, althoughthis may not always be the case. The TUs are typically the same size orsmaller than the PUs. In some examples, residual samples correspondingto a CU may be subdivided into smaller units using a quadtree structureknown as “residual quad tree” (RQT). The leaf nodes of the RQT may bereferred to as transform units (TUs). Pixel difference values associatedwith the TUs may be transformed to produce transform coefficients, whichmay be quantized.

In general, a PU includes data related to the prediction process. Forexample, when the PU is intra-mode encoded, the PU may include datadescribing an intra-prediction mode for the PU. As another example, whenthe PU is inter-mode encoded, the PU may include data defining a motionvector for the PU. The data defining the motion vector for a PU maydescribe, for example, a horizontal component of the motion vector, avertical component of the motion vector, a resolution for the motionvector (e.g., one-quarter pixel precision or one-eighth pixelprecision), a reference picture to which the motion vector points,and/or a reference picture list (e.g., List 0, List 1, or List C) forthe motion vector.

In general, a TU is used for the transform and quantization processes. Agiven CU having one or more PUs may also include one or more transformunits (TUs). Following prediction, video encoder 20 may calculateresidual values corresponding to the PU. The residual values comprisepixel difference values that may be transformed into transformcoefficients, quantized, and scanned using the TUs to produce serializedtransform coefficients for entropy coding. This disclosure typicallyuses the term “video block” to refer to a coding node of a CU. In somespecific cases, this disclosure may also use the term “video block” torefer to a treeblock, i.e., LCU, or a CU, which includes a coding nodeand PUs and TUs.

A video sequence typically includes a series of video frames orpictures. A group of pictures (GOP) generally comprises a series of oneor more of the video pictures. A GOP may include syntax data in a headerof the GOP, a header of one or more of the pictures, or elsewhere, thatdescribes a number of pictures included in the GOP. Each slice of apicture may include slice syntax data that describes an encoding modefor the respective slice. Video encoder 20 typically operates on videoblocks within individual video slices in order to encode the video data.A video block may correspond to a coding node within a CU. The videoblocks may have fixed or varying sizes, and may differ in size accordingto a specified coding standard.

As an example, the HM supports prediction in various PU sizes. Assumingthat the size of a particular CU is 2N×2N, the HM supportsintra-prediction in PU sizes of 2N×2N or N×N, and inter-prediction insymmetric PU sizes of 2N×2N, 2N×N, N×2N, or N×N. The HM also supportsasymmetric partitioning for inter-prediction in PU sizes of 2N×nU,2N×nD, nL×2N, and nR×2N. In asymmetric partitioning, one direction of aCU is not partitioned, while the other direction is partitioned into 25%and 75%. The portion of the CU corresponding to the 25% partition isindicated by an “n” followed by an indication of “Up”, “Down,” “Left,”or “Right.” Thus, for example, “2N×nU” refers to a 2N×2N CU that ispartitioned horizontally with a 2N×0.5N PU on top and a 2N×1.5N PU onbottom.

In this disclosure, “N×N” and “N by N” may be used interchangeably torefer to the pixel dimensions of a video block in terms of vertical andhorizontal dimensions, e.g., 16×16 pixels or 16 by 16 pixels. Ingeneral, a 16×16 block will have 16 pixels in a vertical direction(y=16) and 16 pixels in a horizontal direction (x=16). Likewise, an N×Nblock generally has N pixels in a vertical direction and N pixels in ahorizontal direction, where N represents a nonnegative integer value.The pixels in a block may be arranged in rows and columns. Moreover,blocks need not necessarily have the same number of pixels in thehorizontal direction as in the vertical direction. For example, blocksmay comprise N×M pixels, where M is not necessarily equal to N.

Following intra-predictive or inter-predictive coding using the PUs of aCU, video encoder 20 may calculate residual data for the TUs of the CU.The PUs may comprise pixel data in the spatial domain (also referred toas the pixel domain) and the TUs may comprise coefficients in thetransform domain following application of a transform, e.g., a discretecosine transform (DCT), an integer transform, a wavelet transform, or aconceptually similar transform to residual video data. The residual datamay correspond to pixel differences between pixels of the unencodedpicture and prediction values corresponding to the PUs. Video encoder 20may form the TUs including the residual data for the CU, and thentransform the TUs to produce transform coefficients for the CU.

Following any transforms to produce transform coefficients, videoencoder 20 may perform quantization of the transform coefficients.Quantization generally refers to a process in which transformcoefficients are quantized to possibly reduce the amount of data used torepresent the coefficients, providing further compression. Thequantization process may reduce the bit depth associated with some orall of the coefficients. For example, an n-bit value may be rounded downto an m-bit value during quantization, where n is greater than m.

In some examples, video encoder 20 may utilize a predefined scan orderto scan the quantized transform coefficients to produce a serializedvector that can be entropy encoded. In other examples, video encoder 20may perform an adaptive scan. After scanning the quantized transformcoefficients to form a one-dimensional vector, video encoder 20 mayentropy encode the one-dimensional vector, e.g., according to contextadaptive variable length coding (CAVLC), context adaptive binaryarithmetic coding (CABAC), syntax-based context-adaptive binaryarithmetic coding (SBAC), Probability Interval Partitioning Entropy(PIPE) coding or another entropy encoding methodology. Video encoder 20may also entropy encode syntax elements associated with the encodedvideo data for use by video decoder 30 in decoding the video data.

To perform CABAC, video encoder 20 may assign a context within a contextmodel to a symbol to be transmitted. The context may relate to, forexample, whether neighboring values of the symbol are non-zero or not.To perform CAVLC, video encoder 20 may select a variable length code fora symbol to be transmitted. Codewords in VLC may be constructed suchthat relatively shorter codes correspond to more probable symbols, whilelonger codes correspond to less probable symbols. In this way, the useof VLC may achieve a bit savings over, for example, using equal-lengthcodewords for each symbol to be transmitted. The probabilitydetermination may be based on a context assigned to the symbol.

In H.264 and the emerging HEVC standard, when CABAC entropy coding isused, the positions of the significant (i.e., non-zero) residualtransform coefficients within a block of video data are coded prior tocoding the absolute values, or “levels” of the coefficients. The processof coding the positions of the significant coefficients within the blockis called significance map (SM) coding. An SM for a block of video datais generally represented as a 2-D array of binary values, i.e., ones andzeros, in which the ones indicate positions of significant coefficientswithin the block, and the zeros indicate positions of non-significant,or zero-valued, coefficients within the block. The ones and the zerosmay be referred to as “significant coefficient flags.” In some cases,only the ones and the zeros that are signalled in the bitstream may bereferred to as “significant coefficient flags,” for example, the onesand the zeros that precede a last significant coefficient flag accordingto a scanning order associated with the block, as described below, andsometimes including the last significant coefficient flag itself.

Additionally, in some cases, the SM may be further represented usinganother 2-D array of ones and zeros, in which a one indicates a positionof a last significant coefficient within the block according to ascanning order associated with the block, and the zeros indicatepositions of all other coefficients within the block. In these cases,the ones and the zeros may be referred to as “last significantcoefficient flags.” Once again, in some examples, only the ones and thezeros that are signalled in the bitstream may be referred to as “lastsignificant coefficient flags.” For example, in cases where the positionof the last significant coefficient is represented using an ordinal(e.g., a string of the zeros and the one of the 2-D array serializedaccording to the scanning order), only the zeros preceding the oneaccording to the scanning order, and the one itself, may be referred toas “last significant coefficient flags.” In other examples, the positionof the last significant coefficient may be represented usingcoordinates, e.g., x- and y-coordinates, of the last significantcoefficient with the block according to the scanning order.

In general, SM coding for a block of video data typically consumes asignificant percentage of the video bitrate used to code the block. Forexample, in some techniques, (e.g., HEVC), the following three scanningorders may be used for SM coding: diagonal scanning order 400,horizontal scanning order 402, and vertical scanning order 404, as shownin the corresponding blocks within FIGS. 4A-4C.

After the SM for the block is coded, the value, or “level,” of eachnon-zero residual transform coefficient of the block (e.g., representedas an absolute value and a sign) is coded. For example, to code SMinformation and residual transform coefficient levels for a block ofvideo data using the CABAC process previously specified in the H.264standard, an absolute value of each non-zero residual transformcoefficient is converted into binary form, or “binarized,” e.g., using aunary (e.g., truncated unary) and/or Golomb (e.g., Exponential-Golomb,or Rice-Golomb) codeword comprising one or more bits, or “bins.” Eachsignificant coefficient flag and last significant coefficient flag(which, as explained above, may be one of the significant coefficientflags) for the block already comprises a single bin, and thus bypassesbinarization. The CABAC context derivation for each significantcoefficient (e.g., for each significant coefficient flag and lastsignificant coefficient flag) of the block includes a consideration of atype of the block (e.g., block size), and a position of the coefficient(e.g., corresponding to the respective flag) within the block, andpossibly the position of the coefficient according to a scanning orderassociated with the block, as well as values of previously codedcoefficients. The CABAC context for each bin of a binarized residualtransform coefficient absolute value includes a position of the binwithin the unary (e.g., truncated unary) and/or Golomb (e.g.,Exponential-Golomb, or Rice-Golomb) codeword that represents theabsolute value of the coefficient, and values of previously codedcoefficients.

According to some video coding techniques, block-based intra-coding mayuse N×N square partitions of CUs as PUs. In some examples, pixels insidea given square partition of a PU may be predicted from boundaries (i.e.,edge pixels) of neighbouring reconstructed PUs, sometimes producing poorpredictions for pixels in, e.g., the right-bottom portion of the PU thanfor other portions of the PU.

To better exploit spatial correlations, so-called “short distanceintra-prediction” (SDIP) coding techniques have been proposed. Forexample, SDIP techniques may include partitioning an N×N square blockinto several lines or non-square blocks with a rectangular shape. In theblock, pixels may be predicted and reconstructed line by line orrectangle by rectangle. As a result, the prediction distance may beshortened.

In some techniques that use SDIP, a CU may be partitioned into PUs aslines or non-square blocks with a rectangular shape. For example, a32×32 CU may be partitioned into four 8×32 PUs, or four 32×8 PUs.Similarly, a 16×16 CU may be partitioned into four 8×8 PUs, as well asinto four 4×16 PUs, or four 16×4 PUs. Moreover, a 4×16 or a 16×4 PU maybe further partitioned into four 1×16 PUs, or four 16×1 PUs. Also, an8×8 CU may also be partitioned into four 2×8 PUs, or four 8×2 PUs.

Additionally, some techniques may also use non-square TUs. For example,techniques that include so-called inter-“non-square transforms,” orinter NSQT may use non-square TUs. As such, the inter NSQT and SDIPtechniques described above may introduce non-square transforms (NSQT)for inter-prediction and intra-prediction, respectively, and, moregenerally, non-square blocks of video data, in some coding techniques.

According to some such techniques where non-square blocks of video dataare used, when coding non-square blocks of video data, residualtransform coefficients of a particular non-square block may be mappedfrom the non-square block into a square block for the purpose of entropycoding the coefficients, as previously described. Such mapping may berequired because the entropy coding process used within the particulartechnique may only be configured to handle square blocks. In otherwords, while the previously described prediction, transform, andquantization steps may be performed for non-square blocks in a similarmanner as described above, techniques that use non-square blocks mayrequire that the residual transform coefficients of the blocks aremapped into square blocks prior to entropy coding the coefficients.

The approach described above has several drawbacks. As one example, themapping described above is problematic when using a CABAC process, whichmay code residual transform coefficients of a block of video data basedon their positions within the block. For example, the mapping ofresidual transform coefficients of a non-square block from thenon-square block into a square block for purposes of entropy coding thecoefficients may result in loss of correlation among the coefficientsthat is inherently present in the non-square block. As one example,non-zero residual transform coefficients may be concentrated, orgrouped, within a subset of the non-square block, e.g., near a top-leftcorner of the block commonly referred to as the “DC” position. Mappingthe residual transform coefficients of the non-square block into asquare block may eliminate such a concentration, or grouping. However,such groupings may be advantageous when selecting a scanning order usedto code the block. For example, because of the grouping, certainscanning orders may be used to code the block more efficiently thanother scanning orders. As another example, the approach described abovealso adds complexity to the coding process, associated with the mappingof residual transform coefficients of non-square blocks from thenon-square blocks into square blocks prior to entropy encoding thecoefficients, and subsequently, from the square blocks into thenon-square blocks after entropy coding the coefficients.

This disclosure describes several techniques that may, in some cases,reduce or eliminate some of the drawbacks described above. Inparticular, the techniques described herein may enable efficient entropycoding of residual transform coefficients of non-square blocks of videodata when performing a context adaptive entropy coding process (e.g.,CABAC, PIPE, etc.). Additionally, the techniques of this disclosure mayenable coding systems to have a lower complexity relative to othersystems to code the coefficients.

As one example, this disclosure proposes techniques for determining ascanning order used to code residual transform coefficients of anon-square block of video data. For example, according to some videocoding techniques (e.g., HEVC), scanning orders used to code blocks ofvideo data generally include the zig-zag, horizontal, diagonal, andvertical scanning orders, as previously described. The techniques ofthis disclosure propose using the zig-zag, horizontal, diagonal, orvertical scanning order, as illustrated in FIGS. 6A-6F, to code aparticular non-square block of video data, depending on anintra-prediction mode used to code the block. Additionally, thetechniques of this disclosure propose using the zig-zag, horizontal,diagonal, or vertical scanning orders to code the block when the blockincludes 64 or fewer residual transform coefficients, irrespective ofthe intra-prediction mode used to code the block. Other exampletechniques include using a single, fixed scanning order to code theblock when the block includes more than 64 residual transformcoefficients, irrespective of the intra-prediction mode used to code theblock.

As another example, this disclosure also proposes techniques for codinga position of a last significant coefficient within a non-square blockof video data according to a scanning order associated with the blockusing context adaptive entropy coding (e.g., CABAC), where one or moreof a width and a height of the block are used to determine contexts. Asa general example, in cases where the last significant coefficientposition for the block is coded using x- and y-coordinates of the 2Dblock, the context used for coding each coordinate may be determinedusing a length, corresponding to a number of block positions, of thecorresponding dimension of the block. For example, the context forcoding the x-coordinate may include the number of block positions in thehorizontal dimension (i.e., width) of the block, while the context forcoding the y-coordinate may be determined using the number of blockpositions in the vertical dimension (i.e., height) of the block.Examples of a position of a last significant coefficient within anon-square block of video data according to a scanning order associatedwith the block, as well as a significance map (SM) for the non-squareblock, and the non-square block itself, are illustrated in FIGS. 5A-5C.

In examples where one of the dimensions of the block includes a singleposition (e.g., the block comprises a single row or column), while theother dimension of the block includes multiple positions (e.g., multiplerows or columns), only the coordinate that corresponds to the dimensionwith multiple positions is coded. For example, for an M×1 block,comprising M columns and a single row, only the x-coordinate may becoded. Similarly, for a 1×N block, comprising 1 column and N rows, onlythe y-coordinate may be coded.

In examples where one of the dimensions of the block includes twopositions (e.g., the block comprises two rows or columns), while theother dimension of the block includes, e.g., more than two positions,the coordinate that corresponds to the dimension that includes more thantwo positions is coded using a context determined using a value of thecoordinate that corresponds to the dimension that includes twopositions. For example, for an M×2 block, comprising M columns and 2rows, the x-coordinate may be coded using information that indicateswhether the y-coordinate corresponds to the first or the second row todetermine the context. Similarly, for a 2×N block, comprising 2 columnsand N rows, the y-coordinate may be coded using information thatindicates whether the x-coordinate corresponds to the first or thesecond column to determine a context. In these examples, thedetermination of the context used for coding each coordinate may stillinclude a consideration of a length of the corresponding dimension ofthe block, as previously described.

As yet another example, this disclosure proposes techniques for coding asignificance map for the non-square block of video data using contextadaptive entropy coding (e.g., CABAC). In particular, the disclosureproposes techniques of coding significant coefficient flags, i.e.,significant coefficient position information, for the block usingcontext adaptive entropy coding. A context model, i.e., one or morecontexts, used to code the significant coefficient position informationfor the block may be shared when coding significant coefficient positioninformation for other blocks of different sizes. For example, a commoncontext model may be used when coding significant coefficient positioninformation for N×M and M×N blocks. To code the significant coefficientposition information for the N×M block, the common context model may beapplied directly, i.e., the one or more contexts may be used directly tocode the significant coefficient position information for the N×M block.On the other hand, to code the significant coefficient positioninformation for the M×N block, the common context model and the one ormore contexts included therein may be applied by transposing the M×Nblock to resemble the N×M block, as illustrated in FIGS. 7A-7B. In thiscase, the transposed dimensions of the block, and the transposedposition of each significant coefficient within the block according tothe scanning order, may correspond to the common context model and theone or more contexts included therein. Furthermore, the common contextmodel and the one or more contexts may be updated using significantcoefficient position information for both the N×M block and the M×Nblock. Once again, in the case of the M×N block, the common contextmodel may be updated using the significant coefficient positioninformation for the transposed, rather than the original M×N block, orvice versa. In another example, rather than transposing the M×N blockitself, the x- and y-coordinates of each coefficient of the M×N blockmay be transposed, or “swapped,” prior to coding the significantcoefficient position information for the block, as described above.

This proposed technique exploits a similarity discovered duringempirical testing between statistics for an N×M block and an M×N block,that indicate probabilities of each position within the respective blockcontaining a significant coefficient. This similarity allows using acommon context model (and the one or more contexts included therein)that includes statistics used to code both N×M blocks and M×N blocks. Asa result of sharing a common context model to code significantcoefficient position information for non-square blocks of multiplesizes, the number of context models (and contexts) used to codenon-square blocks of video data in the corresponding coding system maybe reduced compared to other coding systems, thus possibly resulting ismore efficient use of system resources.

In one example, coding significant coefficient position information fornon-square blocks that include 64 or fewer residual transformcoefficients uses the position of each coefficient within the block todetermine a context. In another example, coding significant coefficientposition information for non-square blocks that include 64 or fewerresidual transform coefficients uses the position of each coefficientwithin the block according to a scanning order associated with the blockto determine a context. For blocks that include more than 16coefficients, coding significant coefficient position information usescoding contexts determined for multiple neighboring coefficients. Forexample, four adjacent coefficients may share a common context. In thismanner, a context individually determined for a significant coefficientflag corresponding to a coefficient within a smaller block may be“mapped” into a larger block to be used to code significant coefficientflags corresponding to multiple adjacent coefficients within the largerblock. For blocks that include more than 64 coefficients, codingsignificant coefficient position information uses coding contextsdetermined by the number of significant neighboring coefficients. Forexample, the significances of five neighboring coefficients are added tocompute the context.

As another example, for 16×1 blocks, comprising 16 columns and a singlerow, the context for coding a particular significant coefficient flagmay be determined using a column number corresponding to a position ofthe corresponding coefficient within the block according to a scanningorder associated with the block. In this case, the scanning order is thehorizontal scanning order that proceeds from the leftmost block positionto the rightmost position. For 1×16 blocks, comprising a single columnand 16 rows, the context for coding a particular significant coefficientflag may be the same as described above, since the block is transposedto resemble a 16×1 block prior to coding the significant coefficientflags for the block. In this example, the context for coding aparticular significant coefficient flag for either the 16×1 block or thetransposed 1×16 block may be derived using the following relationship:Ctx(x)=x;

where ctx(x) indicates the context index for the particular significantcoefficient flag being coded, and “x” indicates the x-coordinate of theposition of the coefficient corresponding to the flag within the block.

As another example, for 8×2 blocks, comprising 8 columns and 2 rows, thecontext for coding a particular significant coefficient flag may bederived using the following relationship:Ctx(x,y)=(x)+(y<<3);

where ctx(x,y) indicates the context index for the particularsignificant coefficient flag being coded, where “<<” indicates a leftshift operator, and “y” indicates the y-coordinate of the position ofthe coefficient corresponding to the flag within the block. In otherwords, ctx(x,y) indicates the context index for the significantcoefficient flag being coded, wherein the flag corresponds to acoefficient that is located at the position within the block indicatedby the x- and y-coordinates. As such, the context for coding aparticular significant coefficient flag may be derived using x- andy-coordinates of the position of coefficient corresponding to the flagwithin the block. Similarly, for 2×8 blocks, comprising 2 columns and 8rows, the context for coding a particular significant coefficient flagmay be derived using the same relationship, once again, after the blockis transposed to resemble an 8×2 block, as previously described.

As still another example, for 16×4 blocks, comprising 16 columns and 4rows, the context for coding a particular significant coefficient flagmay be derived using the following relationship:

if (x <= 1 && x <= 1) { Ctx(x,y) = x + (y << 1); } else if (x < 8) {Ctx(x,y) = 3 + (x >> 1) + ( (y >> 1) << 2); } else { Ctx(x,y) = 9 +(x >> 2) + ( (y >> 1 ) << 1 ); }

where, “>>” indicates a right shift operator.

As illustrated by this relationship, the context is determineddifferently for significant coefficient flags corresponding tocoefficients located in the different subsets, or sub-blocks of the 16×4block. For example, the context may vary depending on whether acoefficient corresponding to a particular significant coefficient flagbeing coded is located within a 2×2 sub-block originating at the DCposition within the block, indicated by x- and y-coordinates (0,0),(0,1), (1,0) and (1,1) within the block. The context may further varyfor flags corresponding to coefficients located outside of the 2×2sub-block, but within a sub-block defined by the x-coordinate being lessthan 8, and for all other positions within the block. Similarly, for4×16 blocks, comprising 4 columns and 16 rows, the context for coding aparticular significant coefficient flag may be derived using the samerelationship, once again, after the block is transposed to resemble a16×4 block, as previously described.

In a similar manner as described above, for 32×8 blocks, comprising 32columns and 8 rows, and their counterpart 8×32 blocks, the context forcoding a particular significant coefficient flag may be computed in asimilar way as currently performed in HEVC, as previously described.

Additionally, as described in greater detail with reference to FIGS.8A-8B, this disclosure also proposes techniques for coding significantcoefficient position information for each of a square block of videodata and a non-square block of video data using a common context model,i.e., a same one or more contexts.

Finally, this disclosure also proposes techniques for coding the value,or “level” information (e.g., represented as an absolute value and asign) of residual transform coefficients of a non-square block of videodata, as illustrated in FIGS. 9A-9B. For example, according to somevideo coding techniques (e.g., HEVC), to code residual transformcoefficient levels of a square block, the block is divided into 4×4sub-blocks, each comprising 16 coefficients. The coefficients withineach 4×4 sub-block are subsequently coded according to a scanning orderassociated with the sub-block. This disclosure proposes coding residualtransform coefficient levels of a non-square block of video data byfirst serializing the coefficients using a scanning order associatedwith the block, and then dividing the serialized coefficients intogroups of 16 coefficients along the scanning order. The coefficientlevels are then coded within each group.

Accordingly, in some examples consistent with the techniques of thisdisclosure, video encoder 20 of source device 12 may be configured toencode certain blocks of video data (e.g., one or more TUs of a CU), andvideo decoder 30 of destination device 14 may be configured to receivethe encoded video data from video encoder 20. As one example, videoencoder 20 and/or video decoder 30 may be configured to code transformcoefficients associated with a block of video data during a video codingprocess, wherein the block has a non-square shape defined by a width anda height. For example, video encoder 20 and/or video decoder 30 may beconfigured to code one or more of x- and y-coordinates that indicate aposition of a last non-zero coefficient within the block according to ascanning order associated with the block. In this example, to code eachof the one or more of the x- and y-coordinates, video encoder 20 and/orvideo decoder 30 may be configured to determine one or more contextsused to code the respective coordinate based at least in part on one ofthe width and the height of the block that corresponds to thecoordinate. Video encoder 20 and/or video decoder 30 may be furtherconfigured to code the respective coordinate by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts.

As another example, video encoder 20 and/or video decoder 30 may be onceagain configured to code transform coefficients associated with a blockof video data during a video coding process, wherein the block has anon-square shape defined by a width and a height. For example, videoencoder 20 and/or video decoder 30 may be configured to code informationthat identifies positions of non-zero coefficients within the block,wherein to code the information, video encoder 20 and/or video decoder30 may be configured to determine one or more contexts used to code theinformation based at least in part on one or more of the width and theheight of the block. Video encoder 20 and/or video decoder 30 may befurther configured to code the information by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts.

In the examples described above, the one or more contexts used to codethe respective one of the x- and y-coordinates being determined based atleast in part on the one of the width and the height of the block thatcorresponds to the coordinate, and the one or more contexts used to codethe information that identifies the positions of the non-zerocoefficients within the block being determined based at least in part onthe one or more of the width and the height of the block, may result inprobability estimates included within the one or more contexts of eachexample being more accurate relative to probability estimates determinedusing other techniques. As a result, video encoder 20 and/or videodecoder 30 may code each of the one or more of the x- and y-coordinatesthat indicate the position of the last non-zero coefficient within theblock according to the scanning order associated with the block, and theinformation that identifies the positions of the non-zero coefficientswithin the block, more efficiently. For example, video encoder 20 and/orvideo decoder 30 may code the x- and y-coordinates and the informationusing fewer bits than when using other techniques to code thecoordinates and the information, e.g., techniques that do not take intoaccount the width and the height of the block, and which may result inless accurate probability estimates.

Furthermore, as described in greater detail below with reference toFIGS. 2 and 3, the techniques of this disclosure may also enable videoencoder 20 and/or video decoder 30 to have less complexity relative toother systems, in particular, when coding the information thatidentifies the positions of the non-zero coefficients within the block,by coding the information for each of multiple blocks having transposeddimensions (e.g., 4×8 and 8×4), or different dimensions (e.g., 4×4 and2×8) using common contexts. Moreover, this disclosure further includesnovel techniques for scanning transform coefficients of non-squareblocks of video data, as well as techniques for coding information thatidentifies values, or “levels,” of non-zero coefficients within theblocks, as also described in greater detail below with reference toFIGS. 2 and 3.

Accordingly, the techniques of this disclosure may enable video encoder20 and/or video decoder 30 to code the transform coefficients associatedwith the block more efficiently than when using other methods. Inparticular, the techniques may improve compression of the transformcoefficients of the block and related syntax information (e.g., the lastsignificant coefficient position information and the significantcoefficient position information for the block), when the coefficientsand the information are coded. Additionally, the techniques may enablevideo encoder 20 and/or video decoder 30 to have lower complexityrelative to other systems to code the coefficients and the relatedsyntax information. In this manner, there may be a relative bit savingsfor a coded bitstream including the coded coefficients and relatedsyntax information, and a relative reduction in complexity for videoencoder 20 and/or video decoder 30 used to code the coefficients and therelated syntax information, when using the techniques of thisdisclosure.

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder or decoder circuitry, as applicable, suchas one or more microprocessors, digital signal processors (DSPs),application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), discrete logic circuitry, software, hardware,firmware or any combinations thereof. Each of video encoder 20 and videodecoder 30 may be included in one or more encoders or decoders, eitherof which may be integrated as part of a combined video encoder/decoder(CODEC). An apparatus including video encoder 20 and/or video decoder 30may comprise an integrated circuit, a microprocessor, and/or a wirelesscommunication device, such as a cellular telephone.

FIG. 2 is a block diagram that illustrates an example of a video encoder20 that may implement the techniques described in this disclosurerelated to coding residual transform coefficients of a non-square blockof video data. Video encoder 20 may perform intra- and inter-coding ofvideo blocks within video slices. Intra-coding relies on spatialprediction to reduce or remove spatial redundancy in video within agiven video frame or picture. Inter-coding relies on temporal predictionto reduce or remove temporal redundancy in video within adjacent framesor pictures of a video sequence. Intra-mode (I mode) may refer to any ofseveral spatial based compression modes. Inter-modes, such asuni-directional prediction (P mode) or bi-prediction (B mode), may referto any of several temporal-based compression modes.

In the example of FIG. 2, video encoder 20 includes a partitioning unit35, prediction module 41, reference picture memory 64, summer 50,transform module 52, quantization unit 54, and entropy encoding unit 56.Prediction module 41 includes motion estimation unit 42, motioncompensation unit 44, and intra-prediction module 46. For video blockreconstruction, video encoder 20 also includes inverse quantization unit58, inverse transform module 60, and summer 62. A deblocking filter (notshown in FIG. 2) may also be included to filter block boundaries toremove blockiness artifacts from reconstructed video. If desired, thedeblocking filter would typically filter the output of summer 62.Additional loop filters (in loop or post loop) may also be used inaddition to the deblocking filter.

As shown in FIG. 2, video encoder 20 receives video data, andpartitioning unit 35 partitions the data into video blocks. Thispartitioning may also include partitioning into slices, tiles, or otherlarger units, as wells as video block partitioning, e.g., according to aquadtree structure of LCUs and CUs. Video encoder 20 generallyillustrates the components that encode video blocks within a video sliceto be encoded. The slice may be divided into multiple video blocks (andpossibly into sets of video blocks referred to as tiles). Predictionmodule 41 may select one of a plurality of possible coding modes, suchas one of a plurality of intra coding modes or one of a plurality ofinter coding modes, for the current video block based on error results(e.g., coding rate and the level of distortion). Prediction module 41may provide the resulting intra- or inter-coded block to summer 50 togenerate residual block data and to summer 62 to reconstruct the encodedblock for use as a reference picture.

Intra-prediction module 46 within prediction module 41 may performintra-predictive coding of the current video block relative to one ormore neighboring blocks in the same frame or slice as the current blockto be coded to provide spatial compression. Motion estimation unit 42and motion compensation unit 44 within prediction module 41 performinter-predictive coding of the current video block relative to one ormore predictive blocks in one or more reference pictures to providetemporal compression.

Motion estimation unit 42 may be configured to determine theinter-prediction mode for a video slice according to a predeterminedpattern for a video sequence. The predetermined pattern may designatevideo slices in the sequence as P slices, B slices or GPB slices. Motionestimation unit 42 and motion compensation unit 44 may be highlyintegrated, but are illustrated separately for conceptual purposes.Motion estimation, performed by motion estimation unit 42, is theprocess of generating motion vectors, which estimate motion for videoblocks. A motion vector, for example, may indicate the displacement of aPU of a video block within a current video frame or picture relative toa predictive block within a reference picture.

A predictive block is a block that is found to closely match the PU ofthe video block to be coded in terms of pixel difference, which may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. In some examples, video encoder 20may calculate values for sub-integer pixel positions of referencepictures stored in reference picture memory 64. For example, videoencoder 20 may interpolate values of one-quarter pixel positions,one-eighth pixel positions, or other fractional pixel positions of thereference picture. Therefore, motion estimation unit 42 may perform amotion search relative to the full pixel positions and fractional pixelpositions and output a motion vector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in reference picture memory 64. Motionestimation unit 42 sends the calculated motion vector to entropyencoding unit 56 and motion compensation unit 44.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Upon receiving the motion vectorfor the PU of the current video block, motion compensation unit 44 maylocate the predictive block to which the motion vector points in one ofthe reference picture lists. Video encoder 20 forms a residual videoblock by subtracting pixel values of the predictive block from the pixelvalues of the current video block being coded, forming pixel differencevalues. The pixel difference values form residual data for the block,and may include both luma and chroma difference components. Summer 50represents the component or components that perform this subtractionoperation. Motion compensation unit 44 may also generate syntax elementsassociated with the video blocks and the video slice for use by videodecoder 30 in decoding the video blocks of the video slice.

Intra-prediction module 46 may intra-predict a current block, as analternative to the inter-prediction performed by motion estimation unit42 and motion compensation unit 44, as described above. In particular,intra-prediction module 46 may determine an intra-prediction mode to useto encode a current block. In some examples, intra-prediction module 46may encode a current block using various intra-prediction modes, e.g.,during separate encoding passes, and intra-prediction module 46 (or modeselect unit 40, in some examples) may select an appropriateintra-prediction mode to use from the tested modes. For example,intra-prediction module 46 may calculate rate-distortion values using arate-distortion analysis for the various tested intra-prediction modes,and select the intra-prediction mode having the best rate-distortioncharacteristics among the tested modes. Rate-distortion analysisgenerally determines an amount of distortion (or error) between anencoded block and an original, unencoded block that was encoded toproduce the encoded block, as well as a bit rate (that is, a number ofbits) used to produce the encoded block. Intra-prediction module 46 maycalculate ratios from the distortions and rates for the various encodedblocks to determine which intra-prediction mode exhibits the bestrate-distortion value for the block.

In any case, after selecting an intra-prediction mode for a block,intra-prediction module 46 may provide information indicative of theselected intra-prediction mode for the block to entropy encoding unit56. Entropy encoding unit 56 may encode the information indicating theselected intra-prediction mode in accordance with the techniques of thisdisclosure. Video encoder 20 may include in the transmitted bitstreamconfiguration data, which may include a plurality of intra-predictionmode index tables and a plurality of modified intra-prediction modeindex tables (also referred to as codeword mapping tables), definitionsof encoding contexts for various blocks, and indications of a mostprobable intra-prediction mode, an intra-prediction mode index table,and a modified intra-prediction mode index table to use for each of thecontexts.

After prediction module 41 generates the predictive block for thecurrent video block via either inter-prediction or intra-prediction,video encoder 20 forms a residual video block by subtracting thepredictive block from the current video block. The residual video datain the residual block may be included in one or more TUs and applied totransform module 52. Transform module 52 transforms the residual videodata into residual transform coefficients using a transform, such as adiscrete cosine transform (DCT) or a conceptually similar transform.Transform module 52 may convert the residual video data from a pixeldomain to a transform domain, such as a frequency domain.

Transform module 52 may send the resulting transform coefficients toquantization unit 54. Quantization unit 54 quantizes the transformcoefficients to further reduce bit rate. The quantization process mayreduce the bit depth associated with some or all of the coefficients.The degree of quantization may be modified by adjusting a quantizationparameter. In some examples, quantization unit 54 may then perform ascan of the matrix including the quantized transform coefficients.Alternatively, entropy encoding unit 56 may perform the scan.

Following quantization, entropy encoding unit 56 entropy encodes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy encoding methodology ortechnique. Following the entropy encoding by entropy encoding unit 56,the encoded bitstream may be transmitted to video decoder 30, orarchived for later transmission or retrieval by video decoder 30.Entropy encoding unit 56 may also entropy encode the motion vectors andthe other syntax elements for the current video slice being coded.

Inverse quantization unit 58 and inverse transform module 60 applyinverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain for later use as areference block of a reference picture. Motion compensation unit 44 maycalculate a reference block by adding the residual block to a predictiveblock of one of the reference pictures within one of the referencepicture lists. Motion compensation unit 44 may also apply one or moreinterpolation filters to the reconstructed residual block to calculatesub-integer pixel values for use in motion estimation. Summer 62 addsthe reconstructed residual block to the motion compensated predictionblock produced by motion compensation unit 44 to produce a referenceblock for storage in reference picture memory 64. The reference blockmay be used by motion estimation unit 42 and motion compensation unit 44as a reference block to inter-predict a block in a subsequent videoframe or picture.

As one example, video encoder 20 may be configured to code transformcoefficients associated with a block of video data during a video codingprocess, wherein the block has a non-square shape defined by a width anda height. In this example, the block may be a TU of a CU, as previouslydescribed.

For example, video encoder 20 may be configured to code one or more ofx- and y-coordinates that indicate a position of a last non-zerocoefficient within the block according to a scanning order associatedwith the block (i.e., last significant coefficient position informationfor the block). To code each of the one or more of the x- andy-coordinates, video encoder 20 may be configured to determine one ormore contexts used to code the respective coordinate based at least inpart on one of the width and the height of the block that corresponds tothe coordinate. Video encoder 20 may be further configured to code therespective coordinate by performing a context adaptive entropy codingprocess (e.g., a CABAC process) based at least in part on the determinedone or more contexts.

In some examples, the width of the block may correspond to thex-coordinate, and the height of the block may correspond to they-coordinate. In other words, to code the x-coordinate, video encoder 20may be configured to use the width of the block to determine the one ormore contexts for coding the x-coordinate. Similarly, to code they-coordinate, video encoder 20 may be configured to use the height ofthe block to determine the one or more contexts for coding they-coordinate.

In other examples, to code the one or more of the x- and y-coordinates,video encoder 20 may be configured to, in the event one of the width andthe height of the block equals “1,” indicating that the one of the widthand the height comprises a single block position, not code one of the x-and y-coordinates that corresponds to the one of the width and theheight.

In still other examples, to code the one or more of the x- andy-coordinates, video encoder 20 may be configured to, in the event oneof the width and the height of the block equals “2,” indicating that theone of the width and the height comprises two block positions, and inthe event another one of the width and the height of the block equals avalue greater than “2,” indicating that the other one of the width andthe height comprises more than two block positions, further determinethe one or more contexts used to code the other one of the x- andy-coordinates that corresponds to the other one of the width and theheight that equals a value greater than “2” based at least in part onthe one of the x- and y-coordinates that corresponds to the one of thewidth and the height that equals “2.”

As another example, video encoder 20 may once again be configured tocode transform coefficients associated with a block of video data duringa video coding process, wherein the block has a non-square shape definedby a width and a height. In this example, once again, the block may be aTU of a CU, as previously described.

For example, video encoder 20 may be configured to code information thatidentifies positions of non-zero coefficients within the block (i.e.,significant coefficient position information for the block), wherein tocode the information, video encoder 20 may be configured to determiningone or more contexts used to code the information based at least in parton one or more of the width and the height of the block. Video encoder20 may be further configured to code the information by performing acontext adaptive entropy coding process (e.g., a CABAC process) based atleast in part on the determined one or more contexts.

In some examples, video encoder 20 may be further configured to, foreach of one or more of the positions of the non-zero coefficients withinthe block, interchange x- and y-coordinates that indicate the respectiveposition within the block prior to coding the information thatidentifies the positions of the non-zero coefficients within the block.

In other examples, video encoder 20 may be further configured totranspose the block prior to coding the information that identifies thepositions of the non-zero coefficients within the block. In theseexamples, the one or more of the width and the height of the block maycomprise one or more of a width and a height of the transposed block. Asone example, to transpose the block prior to coding the information,video encoder 20 may be configured to transpose the block in the eventthe width of the block is greater than the height of the block. Asanother example, to transpose the block prior to coding the information,video encoder 20 may be configured to transpose the block in the eventthe height of the block is greater than the width of the block.

In some examples, the block may be a first block. In these examples,video encoder 20 may be further configured to code information thatidentifies positions of non-zero coefficients within a second block,wherein the second block is different than the first block, and whereinthe second block has a square shape defined by a size. In theseexamples, to code the information, video encoder 20 may be configured tocode the information by performing a context adaptive entropy codingprocess based at least in part on the determined one or more contextsused to code the information that identifies the positions of thenon-zero coefficients within the first block.

In this manner, as previously described, video encoder 20 may have lesscomplexity relative to other systems, in particular, when coding theinformation that identifies the positions of the non-zero coefficientswithin the block. Specifically, as described above, video encoder 20 maycode information that identifies positions of non-zero coefficientswithin multiple blocks having transposed dimensions, or differentdimensions, using a same one or more contexts.

In these examples, video encoder 20 may be further configured todetermine, based on the width and the height of the first block, and onthe size of the second block, that the first block and the second blockinclude a same number of coefficients, and map at least one position ofa coefficient within the first block and at least one position of acoefficient within the second block to at least one common context ofthe determined one or more contexts. Also in these examples, videoencoder 20 may be further configured to update the determined one ormore contexts based on the information that identifies the positions ofthe non-zero coefficients within the first block and the informationthat identifies the positions of the non-zero coefficients within thesecond block.

In further examples, video encoder 20 may also be configured to select ascanning order from a group of scanning orders as a scanning orderassociated with the block based on an intra-prediction mode associatedwith the block, when the block comprises a predetermined number ofcoefficients or fewer, and select a fixed scanning order as the scanningorder associated with the block, when the block comprises more than thepredetermined number of coefficients, Video encoder 20 may be furtherconfigured to code the transform coefficients using the selectedscanning order associated with the block.

In some examples, the predetermined number of coefficients may comprisesixty-four coefficients. In other examples, the group of scanning ordersand the fixed scanning order may each comprise at least one of a zig-zagscanning order, a horizontal scanning order, a vertical scanning order,and a diagonal scanning order. As one example, the diagonal scanningorder may scan the block starting from a smaller one of the width andthe height of the block. As another example, the diagonal scanning ordermay scan the block starting from a larger one of the width and theheight of the block.

In still other examples, video encoder 20 may also be configured to codeinformation that identifies values of non-zero transform coefficientswithin the block, including serializing the transform coefficientsassociated with the block using a scanning order associated with theblock, partitioning the serialized transform coefficients into one ormore groups that each include a predetermined number of the serializedtransform coefficients, and coding information that identifies values ofnon-zero transform coefficients within each group.

In some examples, the predetermined number of coefficients may comprisesixteen coefficients. In other examples, to code the information thatidentifies the values of the non-zero transform coefficients within theblock, video encoder 20 may be configured to code the information whenat least one of the width and the height of the block is not equal to avalue that is an integer multiple of “4.”

Accordingly, as explained above, the techniques of this disclosure mayenable video encoder 20 to encode the transform coefficients associatedwith the block more efficiently than when using other methods. Inparticular, the techniques may improve compression of the transformcoefficients of the block and related syntax information (i.e., the lastsignificant coefficient position information and the significantcoefficient position information for the block), when the coefficientsand the information are encoded. Additionally, the techniques may enablevideo encoder 20 to have lower complexity relative to other systems toencode the coefficients and the related syntax information. In thismanner, there may be a relative bit savings for a coded bitstreamincluding the encoded coefficients and related syntax information, and arelative reduction in complexity for video encoder 20 used to encode thecoefficients and the related syntax information, when using thetechniques of this disclosure.

In this manner, video encoder 20 represents an example of a video coderincluded within an apparatus for coding transform coefficientsassociated with a block of video data during a video coding process,wherein the block has a non-square shape defined by a width and aheight, wherein the video coder configured to code one or more of x- andy-coordinates that indicate a position of a last non-zero coefficientwithin the block according to a scanning order associated with theblock, wherein to code each of the one or more of the x- andy-coordinates, the video coder is configured to determine one or morecontexts used to code the respective coordinate based at least in parton one of the width and the height of the block that corresponds to thecoordinate, and code the respective coordinate by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts. Additionally, video encoder 20 also represents anexample of a video coder included within an apparatus for codingtransform coefficients associated with a block of video data during avideo coding process, wherein the block has a non-square shape definedby a width and a height, wherein the video coder configured to codeinformation that identifies positions of non-zero coefficients withinthe block, wherein to code the information, the video coder isconfigured to determine one or more contexts used to code theinformation based at least in part on one or more of the width and theheight of the block, and coding the information by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts.

FIG. 3 is a block diagram that illustrates an example of a video decoder30 that may implement the techniques described in this disclosurerelated to coding residual transform coefficients of a non-square blockof video data. In the example of FIG. 3, video decoder 30 includes anentropy decoding unit 80, prediction module 81, inverse quantizationunit 86, inverse transform module 88, summer 90, and reference picturememory 92. Prediction module 81 includes motion compensation unit 82 andintra-prediction module 84. Video decoder 30 may, in some examples,perform a decoding pass generally reciprocal to the encoding passdescribed with respect to video encoder 20 from FIG. 2.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Entropy decoding unit80 of video decoder 30 entropy decodes the bitstream to generatequantized coefficients, motion vectors, and other syntax elements.Entropy decoding unit 80 forwards the motion vectors and other syntaxelements to prediction module 81. Video decoder 30 may receive thesyntax elements at the video slice level and/or the video block level.

When the video slice is coded as an intra-coded (I) slice,intra-prediction module 84 of prediction module 81 may generateprediction data for a video block of the current video slice based on asignaled intra-prediction mode and data from previously decoded blocksof the current frame or picture. When the video frame is coded as aninter-coded (i.e., B, P or GPB) slice, motion compensation unit 82 ofprediction module 81 produces predictive blocks for a video block of thecurrent video slice based on the motion vectors and other syntaxelements received from entropy decoding unit 80. The predictive blocksmay be produced from one of the reference pictures within one of thereference picture lists. Video decoder 30 may construct the referenceframe lists, List 0 and List 1, using default construction techniquesbased on reference pictures stored in reference picture memory 92.

Motion compensation unit 82 determines prediction information for avideo block of the current video slice by parsing the motion vectors andother syntax elements, and uses the prediction information to producethe predictive blocks for the current video block being decoded. Forexample, motion compensation unit 82 uses some of the received syntaxelements to determine a prediction mode (e.g., intra- orinter-prediction) used to code the video blocks of the video slice, aninter-prediction slice type (e.g., B slice, P slice, or GPB slice),construction information for one or more of the reference picture listsfor the slice, motion vectors for each inter-encoded video block of theslice, inter-prediction status for each inter-coded video block of theslice, and other information to decode the video blocks in the currentvideo slice.

Motion compensation unit 82 may also perform interpolation based oninterpolation filters. Motion compensation unit 82 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 82 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization unit 86 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 80. The inverse quantization process mayinclude use of a quantization parameter calculated by video encoder 20for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform module 88 applies an inverse transform,e.g., an inverse DCT, an inverse integer transform, or a conceptuallysimilar inverse transform process, to the transform coefficients inorder to produce residual blocks in the pixel domain.

After motion compensation unit 82 generates the predictive block for thecurrent video block based on the motion vectors and other syntaxelements, video decoder 30 forms a decoded video block by summing theresidual blocks from inverse transform module 88 with the correspondingpredictive blocks generated by motion compensation unit 82. Summer 90represents the component or components that perform this summationoperation. If desired, a deblocking filter may also be applied to filterthe decoded blocks in order to remove blockiness artifacts. Other loopfilters (either in the coding loop or after the coding loop) may also beused to smooth pixel transitions, or otherwise improve the videoquality. The decoded video blocks in a given frame or picture are thenstored in reference picture memory 92, which stores reference picturesused for subsequent motion compensation. Reference picture memory 92also stores decoded video for later presentation on a display device,such as display device 28 of FIG. 1.

As one example, video decoder 30 may be configured to code transformcoefficients associated with a block of video data during a video codingprocess, wherein the block has a non-square shape defined by a width anda height. In this example, the block may be a TU of a CU, as previouslydescribed.

For example, video decoder 30 may be configured to code one or more ofx- and y-coordinates that indicate a position of a last non-zerocoefficient within the block according to a scanning order associatedwith the block (i.e., last significant coefficient position informationfor the block), wherein to code each of the one or more of the x- andy-coordinates, video decoder 30 may be configured to determine one ormore contexts used to code the respective coordinate based at least inpart on one of the width and the height of the block that corresponds tothe coordinate. Video decoder 30 may be further configured to code therespective coordinate by performing a context adaptive entropy codingprocess (e.g., a CABAC process) based at least in part on the determinedone or more contexts.

In some examples, the width of the block may correspond to thex-coordinate, and the height of the block may correspond to they-coordinate. In other words, to code the x-coordinate, video decoder 30may be configured to use the width of the block to determine the one ormore contexts for coding the x-coordinate. Similarly, to code they-coordinate, video decoder 30 may be configured to use the height ofthe block to determine the one or more contexts for coding they-coordinate.

In other examples, to code the one or more of the x- and y-coordinates,video decoder 30 may be configured to, in the event one of the width andthe height of the block equals “1,” indicating that the one of the widthand the height comprises a single block position, not code one of the x-and y-coordinates that corresponds to the one of the width and theheight.

In still other examples, to code the one or more of the x- andy-coordinates, video decoder 30 may be configured to, in the event oneof the width and the height of the block equals “2,” indicating that theone of the width and the height comprises two block positions, and inthe event another one of the width and the height of the block equals avalue greater than “2,” indicating that the other one of the width andthe height comprises more than two block positions, further determinethe one or more contexts used to code the other one of the x- andy-coordinates that corresponds to the other one of the width and theheight that equals a value greater than “2” based at least in part onthe one of the x- and y-coordinates that corresponds to the one of thewidth and the height that equals “2.”

As another example, video decoder 30 may once again be configured tocode transform coefficients associated with a block of video data duringa video coding process, wherein the block has a non-square shape definedby a width and a height. In this example, once again, the block may be aTU of a CU, as previously described.

For example, video decoder 30 may be configured to code information thatidentifies positions of non-zero coefficients within the block (i.e.,significant coefficient position information for the block), wherein tocode the information, video decoder is configured to determine one ormore contexts used to code the information based at least in part on oneor more of the width and the height of the block. Video decoder 30 maybe further configured to code the information by performing a contextadaptive entropy coding process (e.g., a CABAC process) based at leastin part on the determined one or more contexts.

In some examples, video decoder 30 may be further configured to, foreach of one or more of the positions of the non-zero coefficients withinthe block, interchange x- and y-coordinates that indicate the respectiveposition within the block prior to coding the information thatidentifies the positions of the non-zero coefficients within the block.

In other examples, video decoder 30 may be further configured totranspose the block prior to coding the information that identifies thepositions of the non-zero coefficients within the block. In theseexamples, the one or more of the width and the height of the block maycomprise one or more of a width and a height of the transposed block. Asone example, to transpose the block prior to coding the information,video decoder 30 may be configured to transpose the block in the eventthe width of the block is greater than the height of the block. Asanother example, to transpose the block prior to coding the information,video decoder 30 may be configured to transpose the block in the eventthe height of the block is greater than the width of the block.

In some examples, the block may be a first block. In these examples,video decoder 30 may be further configured to code information thatidentifies positions of non-zero coefficients within a second block,wherein the second block is different than the first block, and whereinthe second block has a square shape defined by a size. In theseexamples, to code the information, video decoder 30 may be configured tocode the information by performing a context adaptive entropy codingprocess based at least in part on the determined one or more contextsused to code the information that identifies the positions of thenon-zero coefficients within the first block.

In this manner, as previously described, video decoder 30 may have lesscomplexity relative to other systems, in particular, when encoding theinformation that identifies the positions of the non-zero coefficientswithin the block. Specifically, as described above, video decoder 30 maycode information that identifies positions of non-zero coefficientswithin multiple blocks having transposed dimensions, or differentdimensions, using a same one or more contexts.

In these examples, video decoder 30 may be further configured todetermine, based on the width and the height of the first block, and onthe size of the second block, that the first block and the second blockinclude a same number of coefficients, and map at least one position ofa coefficient within the first block and at least one position of acoefficient within the second block to at least one common context ofthe determined one or more contexts. Also in these examples, videodecoder 30 may be further configured to update the determined one ormore contexts based on the information that identifies the positions ofthe non-zero coefficients within the first block and the informationthat identifies the positions of the non-zero coefficients within thesecond block.

In further examples, video decoder 30 may also be configured to select ascanning order from a group of scanning orders as a scanning orderassociated with the block based on an intra-prediction mode associatedwith the block, when the block comprises a predetermined number ofcoefficients or fewer, and selecting a fixed scanning order as thescanning order associated with the block, when the block comprises morethan the predetermined number of coefficients. Video decoder 30 may befurther configured to code the transform coefficients using the selectedscanning order associated with the block.

In some examples, the predetermined number of coefficients may comprisesixty-four coefficients. In other examples, the group of scanning ordersand the fixed scanning order may each comprise at least one of a zig-zagscanning order, a horizontal scanning order, a vertical scanning order,and a diagonal scanning order. As one example, the diagonal scanningorder may scan the block starting from a smaller one of the width andthe height of the block. As another example, the diagonal scanning ordermay scan the block starting from a larger one of the width and theheight of the block.

In still other examples, video decoder 30 may also be configured to codeinformation that identifies values of non-zero transform coefficientswithin the block, including coding information that identifies values ofnon-zero transform coefficients within each of one or more groups thateach include a predetermined number of transform coefficients, joiningthe values for the one or more groups into serialized values, andde-serializing the values using a scanning order associated with theblock.

In some examples, the predetermined number of coefficients may comprisesixteen coefficients. In other examples, to code the information thatidentifies the values of the non-zero coefficients within the block,video decoder 30 may be configured to code the information when at leastone of the width and the height of the block is not equal to a valuethat is an integer multiple of “4.”

Accordingly, as explained above, the techniques of this disclosure mayenable video decoder 30 to decode the encoded transform coefficientsassociated with the block more efficiently than when using othermethods. In particular, the techniques may improve compression of thetransform coefficients of the block and related syntax information(i.e., the last significant coefficient position information and thesignificant coefficient position information for the block), when thecoefficients and the information are encoded and subsequently decoded.Additionally, the techniques may enable video decoder 30 to have lowercomplexity relative to other systems to decode the coefficients and therelated syntax information. In this manner, there may be a relative bitsavings for a coded bitstream including the encoded coefficients andrelated syntax information, and a relative reduction in complexity forvideo decoder 30 used to decode the coefficients and the related syntaxinformation from the coded bitstream, when using the techniques of thisdisclosure.

In this manner, video decoder 30 represents an example of a video coderincluded within an apparatus for coding transform coefficientsassociated with a block of video data during a video coding process,wherein the block has a non-square shape defined by a width and aheight, wherein the video coder configured to code one or more of x- andy-coordinates that indicate a position of a last non-zero coefficientwithin the block according to a scanning order associated with theblock, wherein to code each of the one or more of the x- andy-coordinates, the video coder is configured to determine one or morecontexts used to code the respective coordinate based at least in parton one of the width and the height of the block that corresponds to thecoordinate, and code the respective coordinate by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts. Additionally, video decoder 30 also represents anexample of a video coder included within an apparatus for codingtransform coefficients associated with a block of video data during avideo coding process, wherein the block has a non-square shape definedby a width and a height, wherein the video coder configured to codeinformation that identifies positions of non-zero coefficients withinthe block, wherein to code the information, the video coder isconfigured to determine one or more contexts used to code theinformation based at least in part on one or more of the width and theheight of the block, and code the information by performing a contextadaptive entropy coding process based at least in part on the determinedone or more contexts.

FIGS. 5A-5C are conceptual diagrams that illustrate an example of anon-square block of video data and corresponding significant coefficientposition information and last significant coefficient positioninformation, consistent with the techniques of this disclosure. In theexample of FIGS. 5A-5C, block 500 is an 8×4 block that is scanned usinga diagonal scanning order shown in FIG. 6E. In a similar manner asdescribed above with reference to N×N blocks of video data, blocks 502and 504 are blocks of significant coefficient flags and last significantcoefficient flags, respectively, for block 500. For example, blockposition 506 within block 500 corresponds to a last significantcoefficient within block 500 according to the diagonal scanning order.Furthermore, block position 508 corresponds to a last one of significantcoefficient flags equal to “1” of block 502 according to the diagonalscanning order. Similarly, block position 510 corresponds to a lastsignificant coefficient flag equal to “1” of block 504.

FIGS. 6A-6F are conceptual diagrams that illustrate examples ofnon-square blocks of video data scanned using zig-zag, horizontal,vertical, and diagonal scanning orders, consistent with the techniquesof this disclosure. FIGS. 6A-6F depict examples of zig-zag, horizontal,vertical, and diagonal scanning orders that may be used to code an N×Mblock of video data, comprising N columns and M rows, where N and M havedifferent values (i.e., the block is non-square), as one aspect of thetechniques of this disclosure.

For example, the blocks depicted in each of FIGS. 6A-6E, i.e., blocks600-608, are 8×4 blocks. As another example, the block depicted in FIG.6F, i.e., block 610, is a 4×8 block. Each of the scanning ordersillustrated in FIG. 6A-6F begins at a top-left corner position, commonlyreferred to as a “DC” position, within the respective one of blocks600-610, and proceeds from the DC position to a bottom-right positionwithin the block. For example, block 600 is scanned using one variationof the zig-zag scanning order, block 602 is scanned using anothervariation of the zig-zag scanning order, block 604 is scanned using thehorizontal scanning order, block 606 is scanned using the verticalscanning order, and blocks 608 and 610 are scanned using the diagonalscanning order, as illustrated by the arrows within each block. In otherexamples, other variations of the zig-zag, horizontal, vertical, anddiagonal scanning orders, or other scanning orders, may be used to codenon-square blocks of video data, consistent with the techniques of thisdisclosure.

FIGS. 7A-7B are conceptual diagrams that illustrate an example of anon-square block of video data that has been transposed, consistent withthe techniques of this disclosure. As shown in FIGS. 7A-7B, an 8×4 blockof video data, block 700, may be transposed to generate a 4×8 block ofvideo data, block 702. The example of FIGS. 7A-7B is merely one exampleof transposing a non-square block of video data. In other examples,different techniques may be used for transposing a non-square block ofvideo data, consistent with the techniques of this disclosure.

FIGS. 8A-8B are conceptual diagrams that illustrate an example of asquare block of video data and a non-square block of video data, forwhich significant coefficient position information is coded using acommon one or more contexts, consistent with the techniques of thisdisclosure. For example, as previously explained, in accordance withanother aspect of the techniques of this disclosure, blocks of videodata having different geometries (e.g., square and non-square), and/ororientations (e.g., vertical and horizontal), but a same number ofresidual transform coefficients, may share a same context model, i.e. asame one or more contexts. As one example, the techniques of thisdisclosure provide a mapping among the blocks that may be used todetermine a context for entropy coding each significant coefficient flagof a particular block. For example, the mapping may assign a same orsimilar probability (or frequency) value to a particular position withineach of the blocks having the various geometries and/or orientations. Aspreviously described, the probability, or frequency value may beindicated using a context index.

According to some techniques that use N×N (i.e., square) blocks of videodata, a context used to entropy code each significant coefficient flagof a particular block is dependent upon the position of the flag withinthe block according to a scanning order associated with the block. Asone example, for a 4×4 block of video data and a horizontal scanningorder, the context for coding a particular significant coefficient flagmay be derived using the following relationship:CtxInc=4*PosY+PosX

CtxInc indicates the context index for the particular significantcoefficient flag being coded, and “PosY” and “PosX” indicate they-coordinate and the x-coordinate, respectively, of the position of thecoefficient corresponding to the flag within the N×N block.

According to the techniques of this disclosure, the followingrelationships define an example of the above-described mapping for 8×2and 2×8 blocks:If (PosX<4)CtxInc=4*PosY+PosX;Otherwise, CtxInc=4+4*PosY+PosX;

This mapping assumes that the non-square block has a longer width than aheight, although, in other examples, a non-square block may have alonger height than a width.

FIG. 8A illustrates context indices determined for significantcoefficient flags of a 4×4 block, block 800, using the relationshipdescribed above (i.e., “CtxInc=4*PosY+PosX”). FIG. 8B, in turn,illustrates context indices determined for significant coefficient flagsof an 8×2 block, block 802, also using the relationship described above(i.e., “If (PosX<4) CtxInc=4*PosY+PosX; Otherwise,CtxInc=4+4*PosY+PosX”).

The techniques described above also may be used to determine contextsfor entropy coding significant coefficient flags of non-square blocksthat include 64 coefficients, or any number of coefficients.

It should be noted that multiplications by factors of 2 (e.g., 2, 4, 8,16, etc.) may be accomplished using a “left bit-shift” operation. Forinstance, the left bit-shift operation “a<<3” is equivalent to “8*a.”Similarly, divisions by factors of 2 may be accomplished using a “rightbit-shift” operation. For instance, the right bit-shift operation “a>>3”is equivalent to “a/8,” rounding to a lower integer. As one example, fordetermining the above-described contexts for 8×8 blocks, some techniquesmay use the following relationship:Ctx=4*(PosY>>1)+(PosX>>1)

In accordance with the techniques of this disclosure, theabove-described contexts for 16×4 and 4×16 blocks may be determinedusing the following relationships:PosX1=PosX−[(PosX>>3)<<3]PosY1=PosY+[(PosX>>3)<<2]Ctx=4*(PosY1>>1)+(PosX1>>1)

Similarly, the above-described contexts for 32×2 blocks may bedetermined using the following relationships:PosX1=PosX−[(PosX>>3)<<3]PosY1=PosY+[(PosX>>3)<<1]Ctx=4*(PosY1>>1)+(PosX1>>1)

In this manner, the probabilities, or frequencies, corresponding to eachcontext, may match quite closely for the 32×2 and 2×32 blocks, and forthe 16×4 and 4×16 blocks, with those of the 8×8 block. As such,consistent with the techniques of this disclosure, the contexts for allof the above blocks sizes may be shared.

FIGS. 9A-9B are conceptual diagrams that illustrate an example of anon-square block of video data for which residual transform coefficientshave been grouped according to a diagonal scanning order, consistentwith the techniques of this disclosure. As shown in FIG. 9A, an 8×4block of video data, block 900, is scanned using the diagonal scanningorder that scans block 900 starting from a smaller dimension (i.e.,height) of the block. In other examples, the diagonal scanning order mayscan block 900 starting from a larger dimension (i.e., length). As shownin FIG. 9B, the coefficients of block 900 are serialized into two groupsof coefficients, group 902 and group 904, wherein each group comprisessixteen coefficients of block 900, in this example. In other examples,block 900 may comprise more or fewer coefficients, and the coefficientsmay be grouped into more or fewer groups, each comprising any number ofcoefficients. In any case, the values, or “levels” (e.g., absolute valueand signs) of significant coefficients within each group, in thisexample, group 902 and group 904, may be subsequently coded as describedabove.

FIGS. 10A-10B are flowcharts that illustrate examples of methods ofcoding residual transform coefficients of a non-square block of videodata, consistent with the techniques of this disclosure. The techniquesof FIGS. 10A-10B may generally be performed by any processing unit orprocessor, whether implemented in hardware, software, firmware, or acombination thereof, and when implemented in software or firmware,corresponding hardware may be provided to execute instructions for thesoftware or firmware. For purposes of example, the techniques of FIGS.10A-10B are described with respect to video encoder 20 (FIGS. 1 and 2)and/or video decoder 30 (FIGS. 1 and 3), although it should beunderstood that other devices may be configured to perform similartechniques. Moreover, the steps illustrated in FIGS. 10A-10B may beperformed in a different order or in parallel, and additional steps maybe added and certain steps omitted, without departing from thetechniques of this disclosure.

In some examples, video encoder 20 and/or video decoder 30 may codetransform coefficients associated with a block of video data during avideo coding process, wherein the block has a non-square shape definedby a width and a height. For example, the block may be a TU of a CU, aspreviously described.

Initially, video encoder 20 and/or video decoder 30 may code one or moreof x- and y-coordinates that indicate a position of a last non-zerocoefficient within the block according to a scanning order associatedwith the block. For example, to code each of the one or more of the x-and y-coordinates, video encoder 20 and/or video decoder 30 maydetermine one or more contexts used to code the respective coordinatebased at least in part on one of the width and the height of the blockthat corresponds to the coordinate (1000A). Video encoder 20 and/orvideo decoder 30 may further code the respective coordinate byperforming a context adaptive entropy coding process based at least inpart on the determined one or more contexts (1002A).

In some examples, the width of the block may correspond to thex-coordinate, and the height of the block may correspond to they-coordinate. In other words, to code the x-coordinate, video encoder 20and/or video decoder 30 may use the width of the block as to determinethe one or more contexts for coding the x-coordinate. Similarly, to codethe y-coordinate, video encoder 20 and/or video decoder 30 may use theheight of the block to determine the one or more contexts for coding they-coordinate.

In other examples, to code the one or more of the x- and y-coordinates,video encoder 20 and/or video decoder 30 may, in the event one of thewidth and the height of the block equals “1,” indicating that the one ofthe width and the height comprises a single block position, not code oneof the x- and y-coordinates that corresponds to the one of the width andthe height.

In still other examples, to code the one or more of the x- andy-coordinates, video encoder 20 and/or video decoder 30 may, in theevent one of the width and the height of the block equals “2,”indicating that the one of the width and the height comprises two blockpositions, and in the event another one of the width and the height ofthe block equals a value greater than “2,” indicating that the other oneof the width and the height comprises more than two block positions,further determine the one or more contexts used to code the other one ofthe x- and y-coordinates that corresponds to the other one of the widthand the height that equals a value greater than “2” based at least inpart on the one of the x- and y-coordinates that corresponds to the oneof the width and the height that equals “2.”

Finally, in some examples, video encoder 20 and/or video decoder 30 mayfurther code information that identifies positions of non-zerocoefficients within the block (i.e., significant coefficient positioninformation for the block) (1004A).

In other examples, video encoder 20 and/or video decoder 30 may onceagain code transform coefficients associated with a block of video dataduring a video coding process, wherein the block has a non-square shapedefined by a width and a height. In these examples, once again, theblock may be a TU of a CU, as previously described.

Initially, in some examples, video encoder 20 and/or video decoder 30may code information that identifies a position of a last non-zerocoefficient within the block according to a scanning order associatedwith the block (i.e., last significant coefficient position informationfor the block) (1000B).

Furthermore, video encoder 20 and/or video decoder 30 may codeinformation that identifies positions of non-zero coefficients withinthe block (i.e., significant coefficient position information for theblock), wherein to code the information, video encoder 20 and/or videodecoder 30 may determine one or more contexts used to code theinformation based at least in part on one or more of the width and theheight of the block (1002B). Video encoder 20 and/or video decoder 30may further code the information by performing a context adaptiveentropy coding process based at least in part on the determined one ormore contexts (1004B).

In some examples, video encoder 20 and/or video decoder 30 may further,for each of one or more of the positions of the non-zero coefficientswithin the block, interchange x- and y-coordinates that indicate therespective position within the block prior to coding the informationthat identifies the positions of the non-zero coefficients within theblock.

In other examples, video encoder 20 and/or video decoder 30 may furthertranspose the block prior to coding the information that identifies thepositions of the non-zero coefficients within the block. In theseexamples, the one or more of the width and the height of the block maycomprise one or more of a width and a height of the transposed block. Asone example, to transpose the block prior to coding the information,video encoder 20 and/or video decoder 30 may transpose the block in theevent the width of the block is greater than the height of the block. Asanother example, to transpose the block prior to coding the information,video encoder 20 and/or video decoder 30 may transpose the block in theevent the height of the block is greater than the width of the block.

In some examples, the block may be a first block. In these examples,video encoder 20 and/or video decoder 30 may further code informationthat identifies positions of non-zero coefficients within a secondblock, wherein the second block is different than the first block, andwherein the second block has a square shape defined by a size. In theseexamples, to code the information, video encoder 20 and/or video decoder30 may code the information by performing a context adaptive entropycoding process based at least in part on the determined one or morecontexts used to code the information that identifies the positions ofthe non-zero coefficients within the first block.

In these examples, video encoder 20 and/or video decoder 30 may furtherdetermine, based on the width and the height of the first block, and onthe size of the second block, that the first block and the second blockinclude a same number of coefficients, and map at least one position ofa coefficient within the first block and at least one position of acoefficient within the second block to at least one common context ofthe determined one or more contexts. Also in these examples, videoencoder 20 and/or video decoder 30 may further update the determined oneor more contexts based on the information that identifies the positionsof the non-zero coefficients within the first block and the informationthat identifies the positions of the non-zero coefficients within thesecond block.

In further examples, video encoder 20 and/or video decoder 30 may alsoselect a scanning order from a group of scanning orders as a scanningorder associated with the block based on an intra-prediction modeassociated with the block, when the block comprises a predeterminednumber of coefficients or fewer, and select a fixed scanning order asthe scanning order associated with the block, when the block comprisesmore than the predetermined number of coefficients. Video encoder 20and/or video decoder 30 may further code the transform coefficientsusing the selected scanning order associated with the block.

In some examples, the predetermined number of coefficients may comprisesixty-four coefficients. In other examples, the group of scanning ordersand the fixed scanning order may each comprise at least one of a zig-zagscanning order, a horizontal scanning order, a vertical scanning order,and a diagonal scanning order. As one example, the diagonal scanningorder may scan the block starting from a smaller one of the width andthe height of the block. As another example, the diagonal scanning ordermay scan the block starting from a larger one of the width and theheight of the block.

In still other examples, video encoder 20 and/or video decoder 30 mayalso code information that identifies values of non-zero transformcoefficients within the block, including serializing the transformcoefficients associated with the block using a scanning order associatedwith the block, partitioning the serialized transform coefficients intoone or more groups that each include a predetermined number of theserialized transform coefficients, and coding information thatidentifies values of non-zero transform coefficients within each group.

In some examples, the predetermined number of coefficients may comprisesixteen coefficients. In other examples, to code the information thatidentifies the values of the non-zero transform coefficients within theblock, video encoder 20 and/or video decoder 30 may code the informationwhen at least one of the width and the height of the block is not equalto a value that is an integer multiple of “4.”

In this manner, the method of FIG. 10A represents an example of a methodof coding transform coefficients associated with a block of video dataduring a video coding process, wherein the block has a non-square shapedefined by a width and a height, the method comprising coding one ormore of x- and y-coordinates that indicate a position of a last non-zerocoefficient within the block according to a scanning order associatedwith the block, wherein coding each of the one or more of the x- andy-coordinates includes determining one or more contexts used to code therespective coordinate based at least in part on one of the width and theheight of the block that corresponds to the coordinate, and coding therespective coordinate by performing a context adaptive entropy codingprocess based at least in part on the determined one or more contexts.Furthermore, the method of FIG. 10B represents an example of a method ofcoding transform coefficients associated with a block of video dataduring a video coding process, wherein the block has a non-square shapedefined by a width and a height, the method comprising codinginformation that identifies positions of non-zero coefficients withinthe block, wherein coding the information comprises determining one ormore contexts used to code the information based at least in part on oneor more of the width and the height of the block, and coding theinformation by performing a context adaptive entropy coding processbased at least in part on the determined one or more contexts.

Additionally, it should be noted that, consistent with the techniques ofthis disclosure, all of the techniques described above related to codingresidual transform coefficients of a non-square block of video data tomay be performed separately, together, or in any combination thereof.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method of decoding transform coefficients associated with a first block of video data during a video decoding process, wherein the first block has a non-square shape defined by a width and a height, the method comprising: decoding, with a video decoder, one or more of x- or y-coordinates that indicate a position of a last non-zero coefficient within the first block according to a scanning order associated with the block; determining, with the video decoder, that the one of the width or the height comprises a single block position; determining, with the video decoder, one or more contexts used to code a respective x- or y-coordinate based at least in part on one of the width or the height of the block not having the single block position that corresponds to the respective x- or y-coordinate; and decoding, with the video decoder, only the respective x- or y-coordinate by performing a context adaptive entropy coding process based at least in part on the determined one or more contexts.
 2. The method of claim 1, wherein the width of the first block corresponds to the x-coordinate, and the height of the first block corresponds to the y-coordinate.
 3. The method of claim 1, further comprising: in the event one of the width or the height of a second block equals “2,” determining, with the video decoder, that the one of the width or the height comprises two block positions, in the event another one of the width or the height of the second block equals a value greater than “2,” determining, with the video decoder, that the other one of the width or the height comprises more than two block positions, and further determining, with the video decoder, the one or more contexts used to decode the other one of the x- or y-coordinates that correspond to the other one of the width or the height that equals a value greater than “2” based at least in part on the one of the x- or y-coordinates that corresponds to the one of the width or the height that equals “2”.
 4. The method of claim 1, further comprising: inverse transforming, with the video decoder, the transform coefficients to produce residual data; and decoding, with the video decoder, the residual data to produce the first block of video data.
 5. The method of claim 1, the method being executable on a wireless communication device, wherein the wireless communication device comprises: a memory configured to store the video data; a processor configured to execute instructions to process the video data stored in the memory; and a receiver configured to receive the video data.
 6. The method of claim 5, wherein the wireless communication device is a cellular telephone and the first block of video data is received by the receiver and modulated according to a cellular communication standard.
 7. An apparatus configured to decode transform coefficients associated with a first block of video data during a video decoding process, wherein the first block has a non-square shape defined by a width and a height, the apparatus comprising: a video memory configured to store the first block of video data; and a video decoder in communication with the video memory, the video decoder configured to: decode one or more of x- or y-coordinates that indicate a position of a last non-zero coefficient within the first block according to a scanning order associated with the block; determine that the one of the width or the height comprises a single block position; determine one or more contexts used to code a respective x- or y-coordinate based at least in part on one of the width or the height of the block not having the single block position that corresponds to the respective x- or y-coordinate; and decode only the respective x- or y-coordinate by performing a context adaptive entropy coding process based at least in part on the determined one or more contexts.
 8. The apparatus of claim 7, wherein the width of the first block corresponds to the x-coordinate, and the height of the first block corresponds to the y-coordinate.
 9. The apparatus of claim 7, wherein the video decoder is further configured to: determine, in the event one of the width or the height of a second block equals “2,” that the one of the width or the height comprises two block positions; determine, in the event another one of the width or the height of the second block equals a value greater than “2,” that the other one of the width or the height comprises more than two block positions; and further determine the one or more contexts used to decode the other one of the x- or y-coordinates that corresponds to the other one of the width or the height that equals a value greater than “2” based at least in part on the one of the x- or y-coordinates that corresponds to the one of the width or the height that equals “2”.
 10. The apparatus of claim 7, wherein the video decoder is further configured to: inverse transform the transform coefficients to produce residual data; and decode the residual data to produce the first block of video data.
 11. The apparatus of claim 7, wherein the apparatus is a wireless communication device, the apparatus further comprising: a receiver configured to receive the video data.
 12. The apparatus of claim 11, wherein the wireless communication device is a cellular telephone and the first block of video data is received by the receiver and modulated according to a cellular communication standard.
 13. A device configured to decode transform coefficients associated with a first block of video data during a video decoding process, wherein the first block has a non-square shape defined by a width and a height, the device comprising: means for decoding one or more of x- or y-coordinates that indicate a position of a last non-zero coefficient within the first block according to a scanning order associated with the block; means for determining that the one of the width or the height comprises a single block position; means for determining one or more contexts used to code a respective x- or y-coordinate based at least in part on one of the width or the height of the block not having the single block position that corresponds to the respective x- or y-coordinate; means for decoding only the respective x- or y-coordinate by performing a context adaptive entropy coding process based at least in part on the determined one or more contexts.
 14. The device of claim 13, wherein the width of the first block corresponds to the x-coordinate, and the height of the first block corresponds to the y-coordinate.
 15. The device of claim 13, further comprising: means for determining, in the event one of the width or the height of a second block equals “2,” that the one of the width or the height comprises two block positions, means for determining, in the event another one of the width or the height of the second block equals a value greater than “2,” that the other one of the width or the height comprises more than two block positions, and means for determining the one or more contexts used to decode the other one of the x- or y-coordinates that corresponds to the other one of the width or the height that equals a value greater than “2” based at least in part on the one of the x- or y-coordinates that corresponds to the one of the width or the height that equals “2”.
 16. The device of claim 13, further comprising: means for inverse transforming the transform coefficients to produce residual data; and means for decoding the residual data to produce the first block of video data.
 17. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to decode transform coefficients associated with a first block of video data during a video decoding process, wherein the first block has a non-square shape defined by a width and a height, and wherein the instructions cause the one or more processors to: decode one or more of x- or y-coordinates that indicate a position of a last non-zero coefficient within the first block according to a scanning order associated with the block; determine that the one of the width or the height comprises a single block position; determine one or more contexts used to code a respective x- or y-coordinate based at least in part on one of the width or the height of the block not having the single block position that corresponds to the respective x- or y-coordinate; and decode only the respective x- or y-coordinate by performing a context adaptive entropy coding process based at least in part on the determined one or more contexts.
 18. The non-transitory computer-readable storage medium of claim 17, wherein the width of the first block corresponds to the x-coordinate, and the height of the first block corresponds to the y-coordinate.
 19. The non-transitory computer-readable storage medium of claim 17, wherein the instructions further cause the one or more processors to: in the event one of the width or the height of a second block equals “2,” determine that the one of the width or the height comprises two block positions, in the event another one of the width or the height of the second block equals a value greater than “2,” determine that the other one of the width or the height comprises more than two block positions, and further determine the one or more contexts used to decode the other one of the x- or y-coordinates that corresponds to the other one of the width or the height that equals a value greater than “2” based at least in part on the one of the x- or y-coordinates that corresponds to the one of the width or the height that equals “2”.
 20. The non-transitory computer-readable storage medium of claim 17, wherein the instructions further cause the one or more processors to: inverse transform the transform coefficients to produce residual data; and decode the residual data to produce the first block of video data. 